package day5;

import org.junit.Test;

public class Demo {

	@Test
	public void test1() {
		int num = 3;
		Student student = new Student();
		int[] array = new int[3];
		int[] array2 = {23, 45, 6};
	}
	
	@Test
	public void test2() {
		String str = "Hello Java And Python";
		String str2 = str.toUpperCase();
		System.out.println(str2);
		
		System.out.println(str.toLowerCase());
		
	}
	
	@Test
	public void test65() {
		String str = "Hello Java And Python";
		char[] array = str.toCharArray();
		
		for (int i = 0; i < array.length; i++) {
			if (array[i] >= 'A' && array[i] <= 'Z') {
				// Type是类型，写的任何一个类就是一个Type类型   un in mis
				// Type mismatch: cannot convert from int to char
				array[i] = (char)(array[i] + 32);
			}
		}
		
		
		// 字符数组作为参数，new String时候会拼接成字符串
		// String str = new String("Hello World");
		String str2 = new String(array);
		System.out.println(str2);
	}
	
	@Test
	public void test6() {
		// JAVA中char和整型只要不超出范围就可以自动类型转换
		// 97没有超过char类型的范围，所以不需要强制转换
		char ch1 = 'A' + 32;
		System.out.println(ch1);// a
		char ch2 = 97;
		System.out.println(ch2);// a
		byte b1 = 23;
	}
	
	@Test
	public void test67() {
		Student student = new Student();
	}
	
}
